#include <header.h>
void func(int num){
	printf("i am fun\n");
	sleep(8);
	
	sigset_t set;
	sigemptyset(&set);
	sigpending(&set);

	if(sigismember(&set, 3)){
		printf("sig:3\n");
	}	
	printf("over\n");
}


int main(int argc, char *argv[]){
	struct sigaction act, old;
	memset(&act, 0, sizeof act);
	memset(&old, 0, sizeof old);

	act.sa_handler = func;
	sigset_t set;
	sigemptyset(&set);
	sigfillset(&set);
	act.sa_mask = set;

	sigaction(2, &act, &old);
	

	while(1);
	return 0;
}

